Map visual overhaul: event-icon rotors, subtle trails, tunnels layer, player crosses + legend - #47
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ayers) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…labels Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR overhauls the #map rendering pipeline and UX by improving event marker artwork (heli/CH47), softening motion trails, adding a separate persisted tunnels layer, and replacing player name labels with stable color-coded crosses plus a legend embed.
Changes:
- Adds a new persisted
Tunnelsmap layer (ShowTunnels) with EF migration, localization, UI toggle, and rendering split from Monuments. - Reworks player rendering to colored crosses (alive/dead/online/offline styling) with stable palette assignment and a Discord embed legend (
MapComposition). - Updates marker icon loading to support composited rotor icons (patrol heli + chinook) and softens trails via dashed, lower-opacity rendering.
Reviewed changes
Copilot reviewed 34 out of 42 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tests/RustPlusBot.Persistence.Tests/Map/ServerMapSettingsSchemaTests.cs | Verifies ShowTunnels persists and defaults on. |
| tests/RustPlusBot.Persistence.Tests/Map/MapSettingsStoreTests.cs | Adds coverage for toggling only the tunnels layer. |
| tests/RustPlusBot.Localization.Tests/StringsResourceParityTests.cs | Updates expected key count for new localization entry. |
| tests/RustPlusBot.Features.Workspace.Tests/Messages/MapControlMessageRendererTests.cs | Updates expectations for 7 map-layer toggle buttons. |
| tests/RustPlusBot.Features.Map.Tests/PlayerPaletteTests.cs | Adds tests for 9-color palette integrity and wraparound behavior. |
| tests/RustPlusBot.Features.Map.Tests/MarkerIconComposerTests.cs | Validates rotor offsets/count and that compositing changes pixels. |
| tests/RustPlusBot.Features.Map.Tests/MapRendererTests.cs | Updates player placement signature and adds cross-color/dead-vs-alive render tests. |
| tests/RustPlusBot.Features.Map.Tests/MapLegendEmbedTests.cs | Adds tests for embed generation from legend entries. |
| tests/RustPlusBot.Features.Map.Tests/MapLayerSetTests.cs | Verifies AllOn enables the new tunnels layer. |
| tests/RustPlusBot.Features.Map.Tests/MapIconsTests.cs | Adjusts caching tests to reflect marker-icon caching changes. |
| tests/RustPlusBot.Features.Map.Tests/MapComposerTests.cs | Updates composer contract to MapComposition and adds tunnels/legend scenario tests. |
| src/RustPlusBot.Persistence/Migrations/BotDbContextModelSnapshot.cs | Updates EF model snapshot for ShowTunnels. |
| src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.Designer.cs | Adds migration designer for the new tunnels layer column. |
| src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.cs | Adds ShowTunnels column with defaultValue: true. |
| src/RustPlusBot.Persistence/Map/MapSettingsStore.cs | Threads ShowTunnels through settings load/save logic. |
| src/RustPlusBot.Persistence/Map/MapLayer.cs | Adds MapLayer.Tunnels and extends MapLayerSettings with Tunnels. |
| src/RustPlusBot.Localization/Strings.resx | Adds map.layer.tunnels English localization. |
| src/RustPlusBot.Localization/Strings.fr.resx | Adds map.layer.tunnels French localization. |
| src/RustPlusBot.Features.Workspace/Modules/MapComponentModule.cs | Enables toggle logic for the tunnels layer. |
| src/RustPlusBot.Features.Workspace/Messages/MapControlMessageRenderer.cs | Renders the new tunnels toggle button (now 7 toggles). |
| src/RustPlusBot.Features.Map/Rendering/PlayerPlacement.cs | Extends placement model with per-player cross color. |
| src/RustPlusBot.Features.Map/Rendering/PlayerPalette.cs | Introduces stable 9-entry palette mapping to Discord square emojis. |
| src/RustPlusBot.Features.Map/Rendering/MapRenderStyle.cs | Adds cross sizing/styling constants and subtle trail dash/opacity tuning. |
| src/RustPlusBot.Features.Map/Rendering/MapRenderer.cs | Implements tunnels layer rendering, dashed subtle trails, and colored player crosses. |
| src/RustPlusBot.Features.Map/Rendering/MapLayerSet.cs | Adds Tunnels flag and updates AllOn. |
| src/RustPlusBot.Features.Map/Posting/MapLegendEmbed.cs | Builds Discord embed description for the player legend. |
| src/RustPlusBot.Features.Map/Posting/IMapChannelPoster.cs | Extends poster interface to include optional legend payload. |
| src/RustPlusBot.Features.Map/Posting/DiscordMapChannelPoster.cs | Posts the map image with an optional legend embed atomically. |
| src/RustPlusBot.Features.Map/Hosting/MapHostedService.cs | Threads MapComposition through refresh and posting. |
| src/RustPlusBot.Features.Map/Composing/MapLegend.cs | Introduces MapLegendEntry, MapLegend, and MapComposition. |
| src/RustPlusBot.Features.Map/Composing/MapComposer.cs | Produces MapComposition, assigns stable palette colors, splits tunnels from monuments. |
| src/RustPlusBot.Features.Map/Assets/TunnelTokens.cs | Defines the Rust+ monument tokens routed to the tunnels layer. |
| src/RustPlusBot.Features.Map/Assets/MarkerIconComposer.cs | Composites heli/CH47 icons from body + rotor blades. |
| src/RustPlusBot.Features.Map/Assets/MapIcons.cs | Routes patrol/ch47 icons through the composer and keeps caching behavior consistent. |
| src/RustPlusBot.Domain/Map/ServerMapSettings.cs | Adds persisted ShowTunnels setting with default true. |
Files not reviewed (1)
- src/RustPlusBot.Persistence/Migrations/20260711191524_MapTunnelsLayer.Designer.cs: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Map visual overhaul
Improves the
#maprender across four areas (spec/plan brainstormed and executed task-by-task with per-task + final code review).1. Event icons — real, correctly-placed rotors
MarkerIconComposer): the patrol heli gets one rotor on its hub, the CH47 gets two at its tandem front/rear positions. Rotating the whole composite keeps the rotors aligned.patrol.pngand the oldch47.png.2. Motion trails — subtle
PatternPendash) instead of a solid fading smear.3. Train tunnels — separate toggleable layer
train_tunnel_*tokens move out of the Monuments layer into a new persisted, per-serverTunnelslayer (icons still the RustMaps SVG art, just gated separately).ServerMapSettings.ShowTunnels(+ EF migration,defaultValue: trueso existing servers stay on),MapLayer.Tunnels, a 7th#mapcontrol-message toggle button, and EN/FRmap.layer.tunnels. Trainyard & Military Tunnels stay ordinary monuments.4. Players — colored crosses + legend embed
+alive /xdead, dimmed offline) with a dark contrast halo — no more on-map name labels.PlayerPalette(RGB ↔ Discord colored-square emoji), assigned by SteamId sort so a player keeps their color across refreshes.ComposeAsyncnow returnsMapComposition(Png, Legend?), threaded through the host → poster).Verification
-warnaserrorclean;jb cleanupcodezero-diff; no EF model drift.MapCompositionthreading, palette↔legend coupling, poster deleting only its own image posts (control message untouched, embed atomic with the image), tunnel migration backfill + exact exclusion, and composite disposal/no-aliasing.Pending (user gate)
#mapvisual smoke: eyeball the heli/CH47 rotor placement, the vendor icon, and the colored crosses + legend embed on a real tile. Blade offsets/scale and cross sizing are tunable constants (MarkerIconComposer,MapRenderStyle) if adjustment is wanted.🤖 Generated with Claude Code